<heder>
	<!--顶部部分-->
	<div id="topbox">
		<div class="topbox">
			<!--顶部左侧部分-->
			<div class="topleft">
			<ul>
				<li class="topleftitem"><a href="">企业采购</a></li>
				<li class="topleftitem"><a href="">帮助中心</a></li>
				<li class="topleftitem"><a href="">书藏本站</a></li>
				<li class="topleftitem"><a href="">商品入猪</a></li>
				<li class="topleftitem"><a href="">老人手环申请</a></li>
			</ul>
			</div>
			<!--顶部右侧部分-->
			<div class="topright">
				<ul>
					<?php if(isset($_SESSION['uid'])){ ?>
				<li class="topleftitem user">
					<div >
					<a href="javascript:void" class="topleftitem"><?php echo $_SESSION['u_username'] ?></a>
					</div>
					<div class="user_hid">
						<div >
					<a href="javascript:void" class="topleftitem"><?php echo $_SESSION['u_username'] ?></a>
					</div>
						<ul>
							<li><a href="{{U('Myself/index')}}">我的订单</a></li>
							<li><a href="">我的优惠券</a></li>
							<li><a href="">我的喜欢</a></li>
							<li><a href="">我的试用</a></li>
							<li><a href="">试用积分</a></li>
							<li><a href="">收货地址</a></li>
							<li><a href="">我的预约</a></li>
							<li><a href="">账号设置</a></li>
							<li><a href="{{U('Login/out')}}">退出登录</a></li>
							</ul>
					</div>
				</li>
				<?php  } else {?>
					<li class="topleftitem" >
					<div >
					<a href="javascript:void" class="topleftitem logins">登录</a>
					<a href="javascript:void" class="topleftitem registers" >注册</a>	
					</div>
					
				</li>
				
				<?php } ?>
				<li class="topleftitem"><a href="">F码购买</a></li>
				<li class="topleftitem">
					<a href="" class="phone">
					<i></i>
						手机360商城
					</a>
				</li>
				<li class="topleftitem"><a href="">我的订单</a></li>
				<li class="topleftitem topcart" >
					<script type="text/javascript">
					    $(function(){
					    		//点击头部购物删除商品按钮
	$(".cart_item_del").live('click',function(){
	
	var gsid = 	$(this).parents(".cart_item").find(".cart_item_txt span").attr("gsid");
	var _this = $(this);
	$.ajax({
		type:"post",
		url:"{{U('delCart')}}",
		data:{gsid:gsid},
		dataType:'json',
		success:function(data){
			$(".cart_size").html(data.total_rows);
		    _this.parents(".cart_item").remove();
            $(".gAmount span").html(data.total);
            
		 }	
		});
	})
})
</script>
					
					
					
					
					<?php  if(!empty($_SESSION['cart']['goods'])&&isset($_SESSION['uid'])){ ?>
						
					
					<a href="" class="header_cart full_cart">
						<i class="cart_i"></i>
						购物车<span class="cart_size">({{$_SESSION['cart']['total_rows']}})</span>
					</a>
					<?php }else{ ?>
						
						
					<a href="{{U('Cart/index')}}" target="_blank" class="header_cart empty_cart ">
						<i class="cart_i"></i>
						购物车<span class="cart_size">(0)</span>
					</a>
					
					<?php  } ?>
					<div class="topcart_hid">
						<?php if(!empty($_SESSION['cart']['goods'])&&isset($_SESSION['uid'])){ ?>
							
							<div class="g_cart" >
							{{foreach from="$cartdata" key="$k" value="$v"}}
							
							<div class="cart_item">
								<a href="" class="cart_item_img">
									<img src="{{$v['g_pic']}}"/>
								</a>
								<a href=""class="cart_item_txt">
									<span gsid="{{$k}}">{{$v['name']}}</span>
								</a>
								<a href="" class="cart_item_num">{{$v['num']}}</a>
								<a href="" class="cart_item_price">
								￥{{$v['sum']}}
								</a>
								<a href="javascript:void(0);" class="cart_item_del"></a>
							</div>
							{{endforeach}}
							<div class="cart_count">
								<a href="{{U('Cart/index')}}" class="gocart">去购物车</a>
								<span>
									共<b><?php if(!empty($_SESSION['cart']['goods'])&&isset($_SESSION['uid'])){ ?>
								
										{{$cartdata[$k]['total_rows']}}
										<?php }else{ ?>0<?php } ?></b>件商品<br />
									总计 : <b>¥<i>
					<?php if(!empty($_SESSION['cart']['goods'])&&isset($_SESSION['uid'])){ ?>	
										{{$cartdata[$k]['sum']}}
										<?php}else{?>
											0
											<?php }?>
										</i></b>
								</span>
							</div>
						</div>
					<?php }elseif(isset($_SESSION['cart']['goods'])&&isset($_SESSION['uid'])){?>	
						
						<div class="emptycar">您的购物车还没有商品，赶紧去选购吧！</div>
						<!--<div class="emptycar">正在加在购物车……</div>-->
						
					<?php }else{?>
						<div class="emptycar">请<a href="javascript:void(0);" class="logins">登录</a>后查看您的购物车。</div>
						<?php }?>
						
						
						
					</div>
				</li>
			</ul>
				
			</div>
		</div>
		
		
	</div>
	 <!--搜索部分-->
	 <div id="search">
	 	<div class="search">
	 		<!--logo部分-->
	 		<div class="header_logo">
	 			<a href=""><img src="./Public/Home/image/360logo.png"/></a>
	 		</div>
	 		<!--目录搜索部分-->
	 	<div class="searchright">
	 		<ul class="menu_list">
	 			<!--<li class="searitem">
	 				<a href="" class="topa">全部商品分类</a>
	 				
	 			</li>-->
	 			<li class="searitem">
	 				<a href="" class="topa">手机</a>
	 				
	 			</li>
	 			<li class="searitem">
	 				<a href="" class="topa">行车记录仪</a>
	 				<div class="searitem_hid_list">
	 					
	 					<div class="searitem_hid">
	 						<ul>
	 							<li>
	 								<a href=""><img src="./Public/Home/img/search_hid.jpg"/>
	 								<span>360手机N4</span>
	 									<b> 899元</b></a>
	 								
	 							</li>
	 							<li>
	 								<a href=""><img src="./Public/Home/img/search_hid.jpg"/>
	 								<span>360手机N4</span>
	 									<b> 899元</b></a>
	 								
	 							</li>
	 							
	 							
	 						</ul>
	 					</div>
	 				</div>
	 				
	 			</li>
	 			<li class="searitem"><a href="" class="topa">儿童表</a>
	 				<div class="searitem_hid_list">
	 					<div class="searitem_hid">
	 						<ul>
	 							<li>
	 								<a href=""><img src="./Public/Home/img/search_hid.jpg"/>
	 								<span>360手机N4</span>
	 									<b> 899元</b></a>
	 								
	 							</li>
	 							<li>
	 								<a href=""><img src="./Public/Home/img/search_hid.jpg"/>
	 								<span>360手机N4</span>
	 									<b> 899元</b></a>
	 								
	 							</li>
	 						</ul>
	 					</div>
	 				</div>
	 			</li>
	 			<li class="searitem"><a href="" class="topa">设想李</a>
	 				<div class="searitem_hid_list">
	 					<div class="searitem_hid">
	 						<ul>
	 							<li>
	 								<a href=""><img src="./Public/Home/img/search_hid.jpg"/>
	 								<span>3大大大滴滴答答N4</span>
	 									<b> 899元</b></a>
	 								
	 							</li>
	 							<li>
	 								<a href=""><img src="./Public/Home/img/search_hid.jpg"/>
	 								<span>360手机N4</span>
	 									<b> 899元</b></a>
	 								
	 							</li>
	 						</ul>
	 					</div>
	 				</div>
	 			</li>
	 			<li class="searitem"><a href="" class="topa">路由器</a>
	 				<div class="searitem_hid_list">
	 					<div class="searitem_hid">
	 						<ul>
	 							<li>
	 								<a href=""><img src="./Public/Home/img/search_hid.jpg"/>
	 								<span>36是的顶顶顶顶顶顶顶顶顶顶</span>
	 									<b> 899元</b></a>
	 								
	 							</li>
	 							<li>
	 								<a href=""><img src="./Public/Home/img/search_hid.jpg"/>
	 								<span>事实上事实上</span>
	 									<b> 899元</b></a>
	 								
	 							</li>
	 						</ul>
	 					</div>
	 				</div>
	 			</li>
	 			<li class="searitem"><a href="" class="topa">掌声抢</a>
	 				
	 			</li>
	 			<li class="searitem"><a href="" class="topa">一元夺宝</a></li>
	 			<li class="searitem"><a href="" class="topa">试用</a></li>
	 			<li class="searitem"><a href="" class="topa">社区</a></li>
	 		</ul>
	 		<div class="searchbox">
	 			
	 			<form action="" method="post">
	 				<input type="text" name="" id="" class="textbox" value="" placeholder="巴迪龙儿童手表" />
	 				<input type="submit" class="searchbtn" value=""/>
	 			</form>
	 		</div>
	 		<div class="erweima">
	 			<a href="">
	 				<img src="./Public/Home/image/erweima.jpg" alt="" />
	 			</a>
	 		</div>
	 	</div>
	 	</div>
	 	
	 </div>
</heder>